home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cchh01.arc / TAPE.H < prev    next >
Text File  |  1986-03-14  |  2KB  |  76 lines

  1.  
  2. #ifndef  FALSE
  3. #define  FALSE    0x00
  4. #define  TRUE     !(FALSE)
  5. #endif
  6.  
  7. #define  DEFREC   0x2010               /*  default record length = 8208 */
  8. #define  NBLK     0x60                 /*  default mode argument */
  9.  
  10. /*  port definitions  */
  11. #define  INSTAT   0x301
  12. #define  INDATA   0x302
  13. #define  OUTMA    0x300
  14. #define  OUTPA    0x301
  15. #define  OUTCA    0x302
  16. #define  OUTDATA  0x303
  17.  
  18. /*  INSTAT bit map  */
  19. #define  OUT      0x01
  20. #define  IN       0x02
  21.  
  22. /*  command arguments  */
  23. #define  READ     0x01
  24. #define  WRITE    0x02
  25. #define  MARK     0x03
  26. #define  SEARCH   0x0B
  27. #define  SKIPREC  0x0C
  28. #define  SKIPMRK  0x0D
  29. #define  BACKREC  0x0E
  30. #define  BACKMRK  0x0F
  31. #define  RESET    0x10
  32. #define  REWIND   0x40
  33. #define  GETSTAT  0xFF
  34.  
  35. /*  INTERNAL command arguments  */
  36. #define  SETRECL  0x09
  37. #define  DETRECL  0x15
  38.  
  39. /*  interface status bit map  */
  40. #define  DTFOUND  0x40
  41. #define  COMSTAT  0x30
  42. #define  ERRCODE  0x0F
  43.  
  44. /*  COMSTAT bit map  */
  45. #define  OK       0x00
  46. #define  ABORTWO  0x10
  47. #define  ABORTW   0x20
  48. #define  SYNTAX   0x30
  49.  
  50. /*  ERRCODE bit map  */
  51. #define  FLAGC    0x00  /* flag condition exists..caused by power loss, manual
  52.                            rewind, or new tape inserted..correct by issuing
  53.                            rewind command */
  54. #define  WRTPROT  0x01  /* write request to write protected tape */
  55. #define  INVDRV   0x02  /* write req to invalid drive or empty drive */
  56. #define  DRVFAIL  0x03  /* drive failed to respond to command */
  57. #define  VERFM    0x06  /* file mark verification error after writing it */
  58. #define  TRABORT  0x07  /* transport abort prior to command completion */
  59. /*  following are hardware reported errors  */
  60. #define  RDFAIL8  0x08  /* read failure */
  61. #define  RDFAIL9  0x09  /* CRC record error */
  62. #define  RDFAILA  0x0A  /* short record error */
  63. #define  RDFAILB  0x0B  /* bad vertical parity */
  64. #define  WTFAILC  0x0C  /* read after write verify error */
  65. #define  WTFAILD  0x0D  /* makes no sense to me */
  66. #define  RDFAILE  0x0E  /* file mark detected */
  67.  
  68. /*  drive status bit map  */
  69. #define  FMFOUND  0x40
  70. #define  DRVREW   0x20
  71. #define  ONLINE   0x10
  72. #define  BOTP     0x08
  73. #define  EOTP     0x04
  74. #define  WRTENABL 0x01
  75.  
  76.